export type FileContentApi = {
    name: string;
    path: string;
    sha: string;
    size: number;
    url: string;
    html_url: string;
    git_url: string;
    download_url: string;
    type: string;
    content: string;
    encoding: string;
    _links: {
        self: string;
        git: string;
        html: string;
    };
};

export type FileContentModel = {
    name: string;
    htmlUrl: string;
    downloadUrl: string;
    type: string;
    content: string;
};

export const normalizeFileContent = (from: FileContentApi): FileContentModel => ({
    ...from,
    htmlUrl: from.html_url,
    downloadUrl: from.download_url,
});
